<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Stellasketch: Themes</title>
<link rel="stylesheet" href="css/style.css" TYPE="text/css">
</head>
<body onload="document.forms['main'][0].focus()">
<jsp:include page="nav.jsp" />
<jsp:include page="showError.jsp" />

<c:if test="${!empty themes}">
	<p>Add a new theme:</p>
	<form name="main"><input type="text" name="new_theme" /><input type="hidden" name="a"
		value="themes" /> <input
		type="submit" value="OK" /></form>

	<ul>
		<c:forEach items="${themes}" var="t">
			<li><a href="./?a=themes&themeID=${t.id}">(${t.numClues})
			${t.name}</a></li>
		</c:forEach>
	</ul>
</c:if>

<c:if test="${!empty theme}">
	<p><a href="./?a=themes">All Themes</a></p>

	<p>${theme.name}</p>
	<p>Add a clue to ${theme.name}:</p>
	<form name="main">
	<input type="text" name="new_clue" /> <input
		type="submit" value="OK" /><input type="hidden" name="a"
		value="themes" /><input type="hidden" name="themeID" value="${theme.id}" /> 
		</form>

	<p>Clues:</p>
	<ul>
		<c:forEach items="${theme.clues}" var="c">
			<li>${c.name}</li>
		</c:forEach>
	</ul>
</c:if>

</body>
</html>